* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

.register {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 400px;
    padding: 40px;
    box-shadow: 0 15px 25px rgba(0, 0, 0, .4);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.register h2 {
    color: black;
    margin-bottom: 30px;
}

.register .register_box {
    position: relative;
    width: 100%;
}

.register .register_box input {
    outline: none;
    border: none;
    width: 100%;
    padding: 10px 0;
    margin-bottom: 20px;
    color: black;
    font-size: 16px;
    border-bottom: 1px solid #7c7c7c;
    background-color: transparent !important;
}

.register .register_box label {
    position: absolute;
    top: 0;
    left: 0;
    padding: 10px 0;
    color: #7c7c7c;
    pointer-events: none;
    transition: all 0.5s;
}

/* valid检测input输入框内容是否合法，因为之前在input中加入了required所以输入框为空时是不合法的就不会执行下面代码 */
.register .register_box input:focus + label,
.register .register_box input:valid + label {
    top: -20px;
    color: #03e9f4;
    font-size: 12px;
}


.register .register_box input[name='code'] {
    width: 50%;
}

.register #code_btn {
    position: absolute;
    right: 10%;
    bottom: 17%;
    color: #03e9f4;
    background-color: #fff;
    border: 1px solid #7c7c7c;
    width: 35%;
    height: 6%;
}

.register #code_btn :focus {
    outline: none;
}

.register .register_box .error_msg {
    color: red;
    font-size: 12px;
    position: absolute;
    bottom: 50%;
    right: 0;
    pointer-events: none;

}

.register .register_box #验证码 {
    color: red;
    font-size: 12px;
    position: absolute;
    bottom: 0;
    left: 0;
}

.register .register_btn {
    position: relative;
    padding: 10px 20px;
    color: #03e9f4;
    text-decoration: none;
    transition: all 0.3s;
    overflow: hidden;
    cursor: pointer;

}

.register .register_btn:hover {
    color: #ffffff;
    border-radius: 5px;
    background-color: #03e9f4;
    box-shadow: 0 0 5px #03e9f4, 0 0 25px #03e9f4, 0 0 50px #0349f4, 0 0 100px #03e9f4;
}

.register .register_btn span {
    position: absolute;
}

.register .register_btn span:first-child {
    top: 0;
    left: -100%;
    width: 100%;
    height: 2px;
    background: linear-gradient(to right, transparent, #03e9f4);
    animation: move1 1s linear infinite;
}

.register .register_btn span:nth-child(2) {
    right: 0;
    top: -100%;
    width: 2px;
    height: 100%;
    background: linear-gradient(transparent, #03e9f4);
    animation: move2 1s linear 0.25s infinite;
}

.register .register_btn span:nth-child(3) {
    right: -100%;
    bottom: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(to left, transparent, #03e9f4);
    animation: move3 1s linear 0.5s infinite;
}

.register .register_btn span:last-child {
    left: 0;
    bottom: -100%;
    width: 2px;
    height: 100%;
    background: linear-gradient(#03e9f4, transparent);
    animation: move4 1s linear 0.75s infinite;
}

@keyframes move1 {
    0% {
        left: -100%;
    }

    50%,
    100% {
        left: 100%;
    }
}

@keyframes move2 {
    0% {
        top: -100%;
    }

    50%,
    100% {
        top: 100%;
    }

}

@keyframes move3 {
    0% {
        right: -100%;
    }

    50%,
    100% {
        right: 100%;
    }

}

@keyframes move4 {
    0% {
        bottom: -100%;
    }

    50%,
    100% {
        bottom: 100%;
    }

}